import axios from "axios/index";

export function Hot(PageNumber,Sort,MinPrice,MaxPrice,CategoryId,ExcludedSkus) {
  return axios.get('/api/Products', {
    params: {
      PageNumber,
      PageSize: 30,
      promotionType:'Cashback',
      Sort,
      MinPrice,
      MaxPrice,
      CategoryId,
      ExcludedSkus
    }
  }).then((response) => {
    return Promise.resolve(response.data)

  })
    .catch(function (error) {
      console.log(error)
    })
}

export function HotTop(PageNumber) {
  return axios.get('/api/TopProducts', {
    params: {
      PageNumber:PageNumber,
      ModuleType:'Hot',
      PageSize: 1
    }
  }).then((response) => {
    return Promise.resolve(response.data)

  })
    .catch(function (error) {
      console.log(error)
    })
}
